<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.vsg.stock.core.domain.mybatis.StockInfoProxy">


	<resultMap id="StockInfoResult" type="org.vsg.stock.core.domain.mybatis.StockInfoProxy">
		<id property="code" column="STOCK_CODE" />
		<result property="name" column="NAME"/>
		<result property="kind" column="KIND"/>
		<result property="capital" column="CAPITAL"/>
		<result property="aCapital" column="CAPITAL_A"/>
	</resultMap>
	
	
	<select id="findAll"  resultMap="StockInfoResult">
    	select STOCK_CODE , STOCK_NAME , KIND , CAPITAL , CAPITAL_A from STOCK_INFO order by STOCK_CODE 
  	</select>	

	<select id="findAllCode"  resultType="string">
    	select STOCK_CODE from STOCK_INFO order by STOCK_CODE 
  	</select>	

	<select id="findGroupingAll"  resultMap="StockInfoResult">
    	select STOCK_CODE , STOCK_NAME , KIND , CAPITAL , CAPITAL_A from STOCK_INFO WHERE KIND='G' order by STOCK_CODE 
  	</select>

	<select id="findGroupingAllCode"  resultType="string">
    	select STOCK_CODE from STOCK_INFO WHERE KIND='G' order by STOCK_CODE
  	</select>
  	
	<select id="findRealAll"  resultMap="StockInfoResult">
    	select STOCK_CODE , STOCK_NAME , KIND , CAPITAL , CAPITAL_A from STOCK_INFO WHERE KIND='R' order by STOCK_CODE 
  	</select>

	<select id="findRealAllCode"  resultType="string">
    	select STOCK_CODE from STOCK_INFO WHERE KIND='R' order by STOCK_CODE
  	</select>
  	
	<select id="findAllPartMapKeys"  resultType="string">
    	select G_STOCK_CODE||','||R_STOCK_CODE from STOCK_INFO_PART_MAP order by G_STOCK_CODE
  	</select>  	
  	  	
</mapper>
